-- GENERATED SPELL FOR [Scarshield Warlock] --


function spell0_9257(pUnit, Event) --@Scarshield Portal,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(15125,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_9257', 1, 1)
end

function spell1_9257(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(12471,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9257', 3000, 1)
end

function Sorts_9257(pUnit, Event)
local choix_sorts_9257 = math.random(0, 1)
if choix_sorts_9257 == 0 then
pUnit:RegisterEvent('spell0_9257', 1, 1)
end
if choix_sorts_9257 == 1 then
pUnit:RegisterEvent('spell1_9257', 1, 1)
end
end

function mob9257_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_9257', math.random(1500, 3000), 1)
end

function mob9257_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9257_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9257_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(9257, 1, 'mob9257_Action')
RegisterUnitEvent(9257, 2, 'mob9257_Leave')
RegisterUnitEvent(9257, 3, 'mob9257_Kill')
RegisterUnitEvent(9257, 4, 'mob9257_Die')
